package com.jxstyle.modular.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.jxstyle.core.base.BaseController;

@Controller
@RequestMapping("/login")
public class LoginController extends BaseController{

	@GetMapping("")
	public String  login(HttpServletRequest request,String error) {
		HttpSession session = request.getSession();
		Object msg = session.getAttribute("errorMsg");
		if(msg!=null) {
			request.setAttribute("errorMsg", String.valueOf(msg));
			session.removeAttribute("errorMsg");
		}
		return "login";
	}
}
